package com.heima.apis.article;

//import com.heima.apis.article.fallback.IArticleClientFallback;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

//@FeignClient(value="leadnews-article",fallback = IArticleClientFallback.class)
@FeignClient(value="leadnews-article")
public interface IArticleClient {

    //这个路径是微服务leadnews-article的controller所没有的，
    //那这不是远程调用呀，相当于一个新的controller，
    @PostMapping("/api/v1/article/save")
    public ResponseResult saveArticle(@RequestBody ArticleDto dto);
}
